import requests

def proxy_method():
    targetUrl = r"https://share.proxy.qg.net/get?key=2ADA8487"

    resp = requests.get(targetUrl)

    data = resp.json()
    # {
    #       "proxy_ip": "111.85.30.218",
    #       "server": "60.188.79.115:20083",
    #       "area_code": 520300,
    #       "area": "贵州省遵义市",
    #       "isp": "联通",
    #       "deadline": "2025-10-13 15:15:36"
    #     }
    ip_str = data['data'][0]['server']
    ip, port = ip_str.split(':')
    return ip, port

if __name__ == '__main__':
    proxy_method()